package com.cqc.crm.action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class BaseAction extends ActionSupport {

	// 设置默认值 当前页码
	private Integer pageCode = 1;// get()是才有效

	public void setPageCode(Integer pageCode) {
		if (pageCode == null) {
			pageCode = 1;
		}
		this.pageCode = pageCode;
	}

	public Integer getPageCode() {
		return pageCode;
	}

	// 一页显示多少条数据
	private Integer pageSize = 2;

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	
	public Integer getPageSize() {
		return pageSize;
	}

	public void setVS(String key,Object obj) {
		ActionContext.getContext().getValueStack().set(key, obj);
	}
	
	public void push(Object obj) {
		ActionContext.getContext().getValueStack().push(obj);
	}
}
